package edu.cmu.cs.stage3.alice.authoringtool.py;

import java.util.Vector;

import edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources;
import edu.cmu.cs.stage3.resourceBundle.I18n;
import edu.cmu.cs.stage3.util.StringObjectPair;

public class StandardResources {

 public static void init () {
  defaultPropertyValues();
  questionStructure();
  }

 private static void defaultPropertyValues () {
  //L Vector<StringObjectPair> defaultValuesStructure = new Vector<StringObjectPair>();
  Vector defaultValuesStructure = new Vector();

  //L Vector<StringObjectPair> itemAtIndexVec = new Vector<StringObjectPair>();
  Vector itemAtIndexVec = new Vector();
  //L Vector<Object> zeroATresDouble = new Vector<Object>();
  Vector zeroATresDouble = new Vector();
  zeroATresDouble.addElement(new Double(0.0)); //L add(0.0);
  zeroATresDouble.addElement(new Double(1.0)); //L add(1.0); //L 
  zeroATresDouble.addElement(new Double(2.0)); //L add(2.0); //L 
  zeroATresDouble.addElement(new Double(3.0)); //L add(3.0); //L 
  itemAtIndexVec.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.visualization.array.ItemAtIndex", itemAtIndexVec));

  //L  Vector<StringObjectPair> itemAtIndex2 = new Vector<StringObjectPair>();
  Vector itemAtIndex2 = new Vector();
  itemAtIndex2.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.visualization.list.ItemAtIndex", itemAtIndex2));

  //L  Vector<StringObjectPair> setItemAtIndex = new Vector<StringObjectPair>();
  Vector setItemAtIndex = new Vector();
  setItemAtIndex.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.visualization.array.SetItemAtIndex", setItemAtIndex));

  //L  Vector<StringObjectPair> insertItemAtIndex = new Vector<StringObjectPair>();
  Vector insertItemAtIndex = new Vector();
  insertItemAtIndex.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.visualization.list.InsertItemAtIndex", insertItemAtIndex));

  //L  Vector<StringObjectPair> removeItemFromIndex = new Vector<StringObjectPair>();
  Vector removeItemFromIndex = new Vector();
  removeItemFromIndex.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.visualization.list.RemoveItemFromIndex", removeItemFromIndex));

  //L  Vector<StringObjectPair> loopNInOrderStart = new Vector<StringObjectPair>();
  Vector loopNInOrderStart = new Vector();
  //L  Vector<Object> zeroADezDouble = new Vector<Object>();
  Vector zeroADezDouble = new Vector();
  zeroADezDouble.addElement(new Double(0)); //L add(0); //L 
  zeroADezDouble.addElement(new Double(1)); //L add(1); //L 
  zeroADezDouble.addElement(new Double(2)); //L add(2); //L 
  zeroADezDouble.addElement(new Double(5)); //L add(5); //L 
  zeroADezDouble.addElement(new Double(10)); //L add(10); //L 
  loopNInOrderStart.add(new StringObjectPair("start", zeroADezDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.LoopNInOrder", loopNInOrderStart));

  //L  Vector<StringObjectPair> loopNInOrderEnd = new Vector<StringObjectPair>();
  Vector loopNInOrderEnd = new Vector();
  //L  Vector<Object> umAInfinito = new Vector<Object>();
  Vector umAInfinito = new Vector();
  umAInfinito.addElement(new Double(1)); //L add(1); //L 
  umAInfinito.addElement(new Double(2)); //L add(2); //L 
  umAInfinito.addElement(new Double(5)); //L add(5); //L 
  umAInfinito.addElement(new Double(10)); //L add(10); //L 
  umAInfinito.addElement(new Double(Double.POSITIVE_INFINITY)); //L add(Double.POSITIVE_INFINITY); //L 
  loopNInOrderEnd.add(new StringObjectPair("end", umAInfinito));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.LoopNInOrder", loopNInOrderEnd));

  //L  Vector<StringObjectPair> loopNInOrderIncrement = new Vector<StringObjectPair>();
  Vector loopNInOrderIncrement = new Vector();
  //L  Vector<Object> umADez = new Vector<Object>();
  Vector umADez = new Vector();
  umADez.addElement(new Double(1)); //L add(1); //L 
  umADez.addElement(new Double(2)); //L add(2); //L 
  umADez.addElement(new Double(5)); //L add(5); //L 
  umADez.addElement(new Double(10)); //L add(10); //L 
  loopNInOrderIncrement.add(new StringObjectPair("increment", umADez));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.LoopNInOrder", loopNInOrderIncrement));

  //L  Vector<StringObjectPair> loopNStart = new Vector<StringObjectPair>();
  Vector loopNStart = new Vector();
  loopNStart.add(new StringObjectPair("start", zeroADezDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.userdefined.LoopN", loopNStart));

  //L  Vector<StringObjectPair> loopNEnd = new Vector<StringObjectPair>();
  Vector loopNEnd = new Vector();
  loopNEnd.add(new StringObjectPair("end", umAInfinito));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.userdefined.LoopN", loopNEnd));

  //L  Vector<StringObjectPair> loopNIncrement = new Vector<StringObjectPair>();
  Vector loopNIncrement = new Vector();
  loopNIncrement.add(new StringObjectPair("increment", umADez));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.userdefined.LoopN", loopNIncrement));

  //L  Vector<StringObjectPair> partKeyed = new Vector<StringObjectPair>();
  Vector partKeyed = new Vector();
  //L  Vector<Object> key = new Vector<Object>();
  Vector key = new Vector();
  key.add("replace me");
  partKeyed.add(new StringObjectPair("key", key));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.PartKeyed", partKeyed));

  //L  Vector<StringObjectPair> variableNamed = new Vector<StringObjectPair>();
  Vector variableNamed = new Vector();
  //L  Vector<Object> variableName = new Vector<Object>();
  Vector variableName = new Vector();
  variableName.add("replace me");
  variableNamed.add(new StringObjectPair("variableName", variableName));
  //L  Vector<Object> valueClass = new Vector<Object>();
  Vector valueClass = new Vector();
  valueClass.add(java.lang.Boolean.class);
  valueClass.add(java.lang.Number.class);
  valueClass.add(edu.cmu.cs.stage3.alice.core.Model.class);
  variableNamed.add(new StringObjectPair("valueClass", valueClass));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.VariableNamed", variableNamed));

  //L  Vector<StringObjectPair> randomBoolean = new Vector<StringObjectPair>();
  Vector randomBoolean = new Vector();
  //L  Vector<Object> probabilityOfTrue = new Vector<Object>();
  Vector probabilityOfTrue = new Vector();
  probabilityOfTrue.addElement(new Double(0.0)); //L add(0.0); //L  
  probabilityOfTrue.addElement(new Double(.1)); //L add(.1); //L  
  probabilityOfTrue.addElement(new Double(.2)); //L add(.2); //L  
  probabilityOfTrue.addElement(new Double(.3)); //L add(.3); //L  
  probabilityOfTrue.addElement(new Double(.4)); //L add(.4); //L  
  probabilityOfTrue.addElement(new Double(.5)); //L add(.5); //L  
  probabilityOfTrue.addElement(new Double(.6)); //L add(.6); //L  
  probabilityOfTrue.addElement(new Double(.7)); //L add(.7); //L  
  probabilityOfTrue.addElement(new Double(.8)); //L add(.8); //L  
  probabilityOfTrue.addElement(new Double(.9)); //L add(.9); //L  
  probabilityOfTrue.addElement(new Double(1.0)); //L add(1.0); //L  
  randomBoolean.add(new StringObjectPair("probabilityOfTrue", probabilityOfTrue));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.RandomBoolean", randomBoolean));

  //L  Vector<StringObjectPair> randomNumber = new Vector<StringObjectPair>();
  Vector randomNumber = new Vector();
  randomNumber.add(new StringObjectPair("minimum", zeroATresDouble));
  //L  Vector<Object> maximum = new Vector<Object>();
  Vector maximum = new Vector();
  maximum.addElement(new Double(10.0)); //L add(10.0); //L  
  maximum.addElement(new Double(50.0)); //L add(50.0); //L  
  maximum.addElement(new Double(100.0)); //L add(100.0); //L  
  randomNumber.add(new StringObjectPair("maximum", maximum));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.RandomNumber", randomNumber));

  //L  Vector<StringObjectPair> itemAtIndex3 = new Vector<StringObjectPair>();
  Vector itemAtIndex3 = new Vector();
  itemAtIndex3.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.list.ItemAtIndex", itemAtIndex3));

  //L  Vector<StringObjectPair> insertItemAtIndex3 = new Vector<StringObjectPair>();
  Vector insertItemAtIndex3 = new Vector();
  insertItemAtIndex3.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.list.InsertItemAtIndex", insertItemAtIndex3));

  //L  Vector<StringObjectPair> removeItemFromIndex3 = new Vector<StringObjectPair>();
  Vector removeItemFromIndex3 = new Vector();
  removeItemFromIndex3.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.response.list.RemoveItemFromIndex", removeItemFromIndex3));

  //L  Vector<StringObjectPair> itemAtIndex4 = new Vector<StringObjectPair>();
  Vector itemAtIndex4 = new Vector();
  itemAtIndex4.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.array.ItemAtIndex", itemAtIndex4));

  //L  Vector<StringObjectPair> setItemAtIndex4 = new Vector<StringObjectPair>();
  Vector setItemAtIndex4 = new Vector();
  setItemAtIndex4.add(new StringObjectPair("index", zeroATresDouble));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.array.ItemAtIndex", setItemAtIndex4));

  //L  Vector<StringObjectPair> askUserForNumber = new Vector<StringObjectPair>();
  Vector askUserForNumber = new Vector();
  //L  Vector<Object> title = new Vector<Object>();
  Vector title = new Vector();
  title.add("Question");
  askUserForNumber.add(new StringObjectPair("title", title));
  //L  Vector<Object> numberQuestion = new Vector<Object>();
  Vector numberQuestion = new Vector();
  numberQuestion.add(I18n.getString("enterNumber")+":");
  askUserForNumber.add(new StringObjectPair("question", numberQuestion));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.ask.AskUserForNumber", askUserForNumber));

  //L  Vector<StringObjectPair> askUserYesNo = new Vector<StringObjectPair>();
  Vector askUserYesNo = new Vector();
  askUserYesNo.add(new StringObjectPair("title", title));
  //L  Vector<Object> yesNoQuestion = new Vector<Object>();
  Vector yesNoQuestion = new Vector();
  yesNoQuestion.add(I18n.getString("yesOrNo")+"?");
  askUserYesNo.add(new StringObjectPair("question", yesNoQuestion));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.ask.AskUserYesNo", askUserYesNo));

  //L  Vector<StringObjectPair> askUserForString = new Vector<StringObjectPair>();
  Vector askUserForString = new Vector();
  askUserForString.add(new StringObjectPair("title", title));
  //L  Vector<Object> stringQuestion = new Vector<Object>();
  Vector stringQuestion = new Vector();
  stringQuestion.add(I18n.getString("enterString")+":");
  askUserForString.add(new StringObjectPair("question", stringQuestion));
  defaultValuesStructure.add(new StringObjectPair(
    "edu.cmu.cs.stage3.alice.core.question.ask.AskUserForString", askUserForString));

  AuthoringToolResources.setDefaultPropertyValuesStructure(defaultValuesStructure);
  }

 private static void questionStructure () {
  //L  Vector<StringObjectPair> jQuestionStructure = new Vector<StringObjectPair>();
  Vector jQuestionStructure = new Vector();
  String className = "edu.cmu.cs.stage3.alice.core.World";

  //L  Vector<String> comparisonList = new Vector<String>();
  Vector comparisonList = new Vector();
  comparisonList.add("edu.cmu.cs.stage3.alice.core.question.NumberIsEqualTo");
  comparisonList.add("edu.cmu.cs.stage3.alice.core.question.NumberIsNotEqualTo");
  comparisonList.add("edu.cmu.cs.stage3.alice.core.question.NumberIsGreaterThan");
  comparisonList.add("edu.cmu.cs.stage3.alice.core.question.NumberIsGreaterThanOrEqualTo");
  comparisonList.add("edu.cmu.cs.stage3.alice.core.question.NumberIsLessThan");
  comparisonList.add("edu.cmu.cs.stage3.alice.core.question.NumberIsLessThanOrEqualTo");
  jQuestionStructure.add(new StringObjectPair( I18n.getString("comparison"), comparisonList));
  
  //L  Vector<String> askUserList = new Vector<String>();
  Vector askUserList = new Vector();
  askUserList.add("edu.cmu.cs.stage3.alice.core.question.ask.AskUserForNumber");
  askUserList.add("edu.cmu.cs.stage3.alice.core.question.ask.AskUserYesNo");
  askUserList.add("edu.cmu.cs.stage3.alice.core.question.ask.AskUserForString");
  jQuestionStructure.add(new StringObjectPair( I18n.getString("askUser"), askUserList));
  
  //L  Vector<String> mathList = new Vector<String>();
  Vector mathList = new Vector();
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.IEEERemainder");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Round");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Min");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Max");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Abs");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Sqrt");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Floor");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Ceil");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Sin");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Cos");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Tan");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.ACos");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.ASin");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.ATan");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.ATan2");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Pow");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Log");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.Exp");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.ToDegrees");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.ToRadians");
  mathList.add("edu.cmu.cs.stage3.alice.core.question.math.SuperSqrt");
  jQuestionStructure.add(new StringObjectPair(I18n.getString("math"), mathList));

  //L  Vector<String> booleanList = new Vector<String>();
  Vector booleanList = new Vector();
  booleanList.add("edu.cmu.cs.stage3.alice.core.question.Not");
  booleanList.add("edu.cmu.cs.stage3.alice.core.question.And");
  booleanList.add("edu.cmu.cs.stage3.alice.core.question.Or");
  jQuestionStructure.add(new StringObjectPair(I18n.getString("booleanLogic"), booleanList));
  
  //L  Vector<String> randomList = new Vector<String>();
  Vector randomList = new Vector();
  randomList.add("edu.cmu.cs.stage3.alice.core.question.RandomBoolean");
  randomList.add("edu.cmu.cs.stage3.alice.core.question.RandomNumber");
  jQuestionStructure.add(new StringObjectPair(I18n.getString("random"), randomList));

  //L  Vector<String> stringList = new Vector<String>();
  Vector stringList = new Vector();
  stringList.add("edu.cmu.cs.stage3.alice.core.question.StringConcatQuestion");
  stringList.add("edu.cmu.cs.stage3.alice.core.question.ToStringQuestion");
  jQuestionStructure.add(new StringObjectPair(I18n.getString("string"), stringList));

  //L  Vector<String> timeList = new Vector<String>();
  Vector timeList = new Vector();
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.TimeElapsedSinceWorldStart");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.Year");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.MonthOfYear");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.DayOfYear");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.DayOfMonth");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.DayOfWeek");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.DayOfWeekInMonth");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.IsAM");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.IsPM");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.HourOfAMOrPM");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.HourOfDay");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.MinuteOfHour");
  timeList.add("edu.cmu.cs.stage3.alice.core.question.time.SecondOfMinute");
  jQuestionStructure.add(new StringObjectPair(I18n.getString("time"), timeList));

  //L Vector<StringObjectPair> questionStructure = new Vector<StringObjectPair>();
  Vector questionStructure = new Vector();
  questionStructure.add(new StringObjectPair(className, jQuestionStructure));
    
  // Define 'AuthoringToolResources.resources.questionStructure = questionStructure;'
  AuthoringToolResources.setQuestionStructure( questionStructure );
  }

 }
